//
//  KFDMarketViewModel.h
//  KFD
//
//  Created by JIRENTIANXIANG on 6/10/15.
//  Copyright (c) 2015 kfd. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "KFDViewModel.h"
#import "KFDClient.h"

#define KFDMarketPricesReadyNotification @"KFDMarketPricesReady"
#define KFDMarketDiagramViewShouldUpdateNotification @"KFDMarketDiagramViewShouldUpdate"

@class KFDDiagramPoint;
@class KFDMarketPrice;

@interface KFDMarketViewModel : KFDViewModel

@property (strong,nonatomic) NSArray* marketPrices;
@property (assign,nonatomic) NSInteger currentPriceIndex;
@property (strong,nonatomic) NSMutableArray* diagramPointsOfAllTypes;

@property (assign,nonatomic) float breakPointTime;
@property (assign,nonatomic) float breakInterval;

-(instancetype)init;
-(void)loadMarketPrices;
//-(void)loadDiagramPointsForType:(NSString*)type;
-(void)loadDiagramPoints;

-(void)startMarketPriceTimer;
-(void)stopMarketPriceTimer;

-(void)startDiagramTimer;
-(void)stopDiagramTimer;

-(NSString*)selectedType;

@end
